package com.xxxx.comment.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 *
 * @author 虎哥
 * @since 2021-12-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_voucher")
public class Voucher implements Serializable
{
    
    private static final long serialVersionUID = 114514L;
    
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    /**
     * 商铺id
     */
    private Long shopId;
    
    /**
     * 代金券标题
     */
    private String title;
    
    /**
     * 副标题
     */
    private String subTitle;
    
    /**
     * 使用规则
     */
    private String rules;
    
    /**
     * 支付金额
     */
    private Long payValue;
    
    /**
     * 抵扣金额
     */
    private Long actualValue;
    
    /**
     * 优惠券类型
     */
    private Integer type;
    
    /**
     * 优惠券类型
     */
    private Integer status;
    
    /**
     * 库存
     */
    @TableField(exist = false)
    private Integer stock;
    
    /**
     * 生效时间
     */
    @TableField(exist = false)
    private LocalDateTime beginTime;
    
    /**
     * 失效时间
     */
    @TableField(exist = false)
    private LocalDateTime endTime;
    
    /**
     * 创建时间
     */
    private LocalDateTime createTime;
    
    /**
     * 更新时间
     */
    private LocalDateTime updateTime;
    
}
